package com.rf.richfitwheel.dyn.business.mapper;

import com.mybatisflex.core.BaseMapper;
import com.rf.richfitwheel.dyn.business.entity.ModelDataEntity;
import com.rf.richfitwheel.dyn.business.entity.SysBusinessCommon;
import org.apache.ibatis.annotations.Param;

public interface MysqlDynamicMapper extends BaseMapper<SysBusinessCommon> {
    /**
     * 插入数据
     * @param modelDataEntity 数据
     */
    void insertData(ModelDataEntity modelDataEntity);

    /**
     * 修改数据
     * @param modelDataEntity 数据
     */
    void updateData(ModelDataEntity modelDataEntity);

    /**
     * 根据主表id删除数据
     * @param tableName 表名
     * @param mainId 主表id
     */
    void deleteDataByMainId(@Param("tableName") String tableName, @Param("mainId")String mainId);

    /**
     * 批量新增数据
     * @param modelDataEntity 数据
     * @return 数量
     */
    int insertDataBatch(ModelDataEntity modelDataEntity);
}
